<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.6 -->
  <link rel="stylesheet" href="/static/adminlte/bootstrap/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="/static/css/font-awesome.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" type="text/css" href="/static/css/ionicons.min.css" />
  <!-- Theme style -->
  <link rel="stylesheet" href="/static/adminlte/dist/css/AdminLTE.min.css">
  <link rel="stylesheet" href="/static/webuploader-0.1.5/webuploader.css"/>
  <title></title>
	</head>
	<body>

<section class="content">
      <div class="row">
		<div class="col-xs-12">
		          <div class="nav-tabs-custom">
		            <ul class="nav nav-tabs">
		              <li><a href="{{ route('admin.goodscategory.index') }}" aria-expanded="true">分类管理</a></li>
		              <li><a href="{{ route('admin.goodscategory.add') }}" aria-expanded="true">添加分类</a></li>
		              <li class="active"><a aria-expanded="true">编辑分类</a></li>
		            </ul>
		            <div class="tab-content">
						
			<form class="form-horizontal myform" action="{{ route('admin.goodscategory.edit') }}" method="post">
                    <div class="box-body">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">上级菜单</label>

                            <div class="col-sm-10">
	                            <select name="pid" class="form-control">
	                                <option value="0">一级菜单</option>
	                                @foreach($list as $v)
	                                	<option value="{{ $v['id'] }}" {{ $cate['pid']==$v['id'] ? 'selected="selected"' : '' }} >{{ $v['html'].$v['name'] }}</option>
	                                @endforeach
	                            </select>                                  
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">菜单名称</label>
                            <div class="col-sm-10">
                                <input class="form-control" name="name" placeholder="" value="{{ $cate['name'] }}" type="text">
                            </div>
                        </div>
						<div class="form-group">
                            <label class="col-sm-2 control-label">图片</label>
                            <div class="col-sm-10">
	                        	<input type="text" name="image" value="{{ $cate['image'] }}" id="thumb" style="display: none;">
							    <div id="fileList" class="uploader-list">
	
							    </div>
							    <div id="filePicker">选择图片</div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">排序</label>
                            <div class="col-sm-10">
                                <input class="form-control" name="sort" value="{{ $cate['sort'] }}" type="text">
                            </div>
                        </div>
                    </div>
                    <!-- /.box-body -->

                    <div class="box-footer">
                        <div class="col-sm-2">
                        	<input type="hidden" name="id" value="{{ $cate['id'] }}" />
                        	<input type="hidden" name="_token" value="{{csrf_token()}}">
                            <button type="submit" class="btn btn-block btn-danger">保存</button>
                        </div>
                    </div>
                </form>						
										
		            </div><!-- /.tab-content -->
		          </div><!-- /.nav-tabs-custom -->
		</div><!--/.row-->
      </div>
  </section>
<!-- jQuery 2.2.3 -->
<script src="/static/adminlte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="/static/js/jquery.form.js"></script>
<script src="/static/webuploader-0.1.5/webuploader.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/layer/layer.js" type="text/javascript" charset="utf-8"></script>
<!-- Bootstrap 3.3.6 -->
<script src="/static/adminlte/bootstrap/js/bootstrap.min.js"></script>
<script src="/static/js/bootbox.js" type="text/javascript" charset="utf-8"></script>
<script src="/static/js/admin.js?123"></script>
<script src="/static/js/upfile.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>
